<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> -->
</head>
<body>
    <!-- <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642668812&t=dcf2ae77028f6637cdacf62203e75674" alt=""> -->
    <script>
        // jsonp 利用script的不跨域特性；
        // console.log(a);
        // function fn(){
        //     console.log(1111);
        // }

            function fun(res){
                // console.log("fn",res);
                console.log("接收的结果是",JSON.parse(res));
            }


        // 手动创建一个script标签来请求地址；
        document.onclick = function(){
            let s = document.createElement("script");
            s.src = "http://localhost/2113/promise/get.php?name=zhangsan&cb=fun";
            document.head.appendChild(s);
        }


        // function test(arg){
        //     console.log(arg);
        // }

        // // test(1111);
        // test('hello');




    </script>


    <!-- <script src="http://localhost/2113/promise/get.php" type="text/javascript"></script> -->
    
   
    
</body>
</html>